import request from '../../utils/bsinRequest';

// 分页查询任务列表
export const getTaskPageList = (params) => {
  return request('/list', {
    serviceName: 'AdminDaoTaskService',
    methodName: 'getPageList',
    bizParams: {
      ...params,
    },
  });
};

// 创建任务
export const createTask = (params) => {
  return request('/list', {
    serviceName: 'AdminDaoTaskService',
    methodName: 'createTask',
    bizParams: {
      ...params,
    },
  });
};

// 查看任务详情
export const getTaskDetails = (params) => {
  return request('/list', {
    serviceName: 'AdminDaoTaskService',
    methodName: 'getTaskDetails',
    bizParams: {
      ...params,
    },
  });
};

// 发布任务
export const publishTask = (params) => {
  return request('/publish', {
    serviceName: 'AdminDaoTaskService',
    methodName: 'publishTask',
    bizParams: {
      ...params,
    },
  });
};

// 获取账户类型
export const getAccountCategoryByCustomerNo = (params) => {
  return request('/selectType', {
    serviceName: 'AdminAccountService',
    methodName: 'getAccountCategoryByCustomerNo',
    bizParams: {
      ...params,
    },
  });
};

// 审核任务
export const auditTask = (params) => {
  return request('/audit', {
    serviceName: 'AdminDaoTaskService',
    methodName: 'auditTask',
    bizParams: {
      ...params,
    },
  });
};
